package com.aspose.cells.a.d;

import java.util.ArrayList;
import java.util.HashMap;

public class zad {
   private byte[] a;
   private int b;
   private HashMap c;
   private ArrayList d = new ArrayList();

   public zad(byte[] var1) {
      this.a = var1;
      this.c = new HashMap();
   }

   public HashMap a() {
      while(this.b < this.a.length) {
         this.b();
      }

      return this.c;
   }

   private void b() {
      byte[] var1 = new byte[5];
      var1[0] = this.d();
      if ((var1[0] & 255) >= 0 && (var1[0] & 255) <= 21) {
         if (var1[0] == 12) {
            this.c.put(1200 + (this.d() & 255), this.d);
         } else {
            this.c.put(var1[0] & 255, this.d);
         }

         this.d = new ArrayList();
      } else if (var1[0] == 30) {
         com.aspose.cells.b.a.a.ze.a(this.d, (Object)this.c());
      } else if ((var1[0] & 255) >= 32 && (var1[0] & 255) <= 246) {
         com.aspose.cells.b.a.a.ze.a(this.d, (Object)((var1[0] & 255) - 139));
      } else {
         var1[1] = this.d();
         if ((var1[0] & 255) >= 247 && (var1[0] & 255) <= 250) {
            com.aspose.cells.b.a.a.ze.a(this.d, (Object)(((var1[0] & 255) - 247) * 256 + (var1[1] & 255) + 108));
         } else if ((var1[0] & 255) >= 251 && (var1[0] & 255) <= 254) {
            com.aspose.cells.b.a.a.ze.a(this.d, (Object)(-1 * ((var1[0] & 255) - 251) * 256 - (var1[1] & 255) - 108));
         } else {
            var1[2] = this.d();
            if (var1[0] == 28) {
               com.aspose.cells.b.a.a.ze.a(this.d, (Object)((short)((var1[1] & 255) << 8 | var1[2] & 255)));
            } else {
               var1[3] = this.d();
               var1[4] = this.d();
               if (var1[0] == 29) {
                  com.aspose.cells.b.a.a.ze.a(this.d, (Object)((var1[1] & 255) << 24 | (var1[2] & 255) << 16 | (var1[3] & 255) << 8 | var1[4] & 255));
               } else {
                  throw new IllegalArgumentException("DICT operand does not fall in either of acceptable values.");
               }
            }
         }
      }
   }

   private double c() {
      boolean var1 = false;
      StringBuilder var2 = new StringBuilder();

      while(!var1) {
         short var3 = (short)(this.d() & 255);
         short[] var4 = new short[]{(short)((var3 & 240) >> 4), (short)(var3 & 15)};

         for(int var5 = 0; var5 < 2; ++var5) {
            if (var4[var5] >= 0 && var4[var5] <= 9) {
               var2.append(var4[var5]);
            } else {
               switch(var4[var5]) {
               case 10:
                  var2.append(".");
                  break;
               case 11:
                  var2.append("E");
                  break;
               case 12:
                  var2.append("E-");
                  break;
               case 13:
                  throw new IllegalArgumentException("Reserved nibble value.");
               case 14:
                  var2.append("-");
                  break;
               case 15:
                  var1 = true;
                  if (var5 == 0) {
                     ;
                  }
               }
            }
         }
      }

      return com.aspose.cells.a.c.zp.a(com.aspose.cells.b.a.zr.a(var2));
   }

   private byte d() {
      return this.a[this.b++];
   }
}
